//
//  AXFIndentStatusCell.m
//  BeeQuick
//
//  Created by 王誉升 on 2016/11/20.
//  Copyright © 2016年 six_group. All rights reserved.
//

#import "AXFIndentStatusCell.h"

@interface AXFIndentStatusCell()

@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UIView *topLineView;
@property (weak, nonatomic) IBOutlet UIView *bottomLineView;
@property (weak, nonatomic) IBOutlet UIImageView *middleImageView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *descLabel;
@property (weak, nonatomic) IBOutlet UILabel *numberLabel;
@property (weak, nonatomic) IBOutlet UIView *spliteLineView;


@end

@implementation AXFIndentStatusCell

- (void)awakeFromNib
{
    
    [super awakeFromNib];
    
    self.selectionStyle = UITableViewCellSeparatorStyleNone;
}

- (void)setModel:(AXFIndentStatusModel *)model
{
    _model = model;
    
    _timeLabel.text = model.status_time;
    _titleLabel.text = model.status_title;
    _descLabel.text = model.status_desc;
    _numberLabel.text = model.status_number;
    
    if(model.isFirstStatus)
    {
        self.topLineView.hidden = YES;
        
        self.bottomLineView.hidden = NO;
        
    }
    else if(model.isLastStatus)
    {
        self.bottomLineView.hidden = YES;
        
        self.topLineView.hidden = NO;
        
    }
    else
    {
        self.topLineView.hidden = NO;
        
        self.bottomLineView.hidden = NO;
        
    }
    
    if(model.firstStatus)
    {
        self.middleImageView.image = [UIImage imageNamed:@"order_yellowMark"];
    }
    else
    {
        self.middleImageView.image = [UIImage imageNamed:@"order_grayMark"];
    }
    
    if(model.lastStatus)
    {
        self.spliteLineView.hidden = YES;
    }
    else
    {
        self.spliteLineView.hidden = NO;
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    
    [super setSelected:selected animated:animated];
    
}

@end
